package com.jiawei.controller;

import com.jiawei.entity.pojo.Rt;
import com.jiawei.permission.annotation.Permission;
import org.springframework.web.bind.annotation.*;

/**
 * @author : willian fu
 * @date : 2019/12/12
 */
@RestController
public class AuthorityController {

    @Permission("get:role")
    @GetMapping("role")
    public Object getRole(){
        return Rt.ok("成功获取角色");
    }

    @Permission("put:role")
    @PutMapping("role")
    public Object putRole(){
        return Rt.ok("成功修改角色");
    }

    @Permission("del:role")
    @DeleteMapping("role")
    public Object delRole(){
        return Rt.ok("成功删除角色");
    }

    @Permission("add:role")
    @PostMapping("role")
    public Object addRole(){
        return Rt.ok("成功添加角色");
    }
}
